package com.hsomandroidapp.entity;

import java.io.Serializable;

import com.hsomandroidapp.R;
import com.hsomandroidapp.org.json.JSONObject;

public class Product implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -3473665129814654166L;
	private String productId;
	private String productNo;
	private String price;
	private String realPrice;
	private String content;
	private int imageId;
	private int minImageId;
	private int imageInfo;
	private int nums = 1;
	private boolean isChecked;
	private String imageUrl;
	

	public String getProductNo() {
		return productNo;
	}

	public void setProductNo(String productNo) {
		this.productNo = productNo;
	}

	public Product(){

	}
	
	public int getMinImageId() {
		return minImageId;
	}

	public void setMinImageId(int minImageId) {
		this.minImageId = minImageId;
	}

	public int getImageInfo() {
		return imageInfo;
	}

	public void setImageInfo(int imageInfo) {
		this.imageInfo = imageInfo;
	}

	public String getImageUrl() {
		return imageUrl;
	}

	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}

	public Product(JSONObject obj){
		try {
			productId = obj.getString("goods_id");
			productNo = obj.getString("goods_no");
			price = obj.getString("ori_price");
			realPrice = obj.getString("price");
			content = obj.getString("goods_name");
			imageUrl = obj.getString("image_url");
			//initImageIdFrmProductId();
		} catch (Exception e) {
		}
		
	}
	public boolean isChecked() {
		return isChecked;
	}
	public void setChecked(boolean isChecked) {
		this.isChecked = isChecked;
	}
	public void initImageIdFrmProductId(){
		
	}
	
	public int getNums() {
		return nums;
	}
	public void setNums(int nums) {
		this.nums = nums;
	}
	public String getProductId() {
		return productId;
	}
	public void setProductId(String productId) {
		this.productId = productId;
		initImageIdFrmProductId();
	}
	public String getPrice() {
		return price;
	}
	public void setPrice(String price) {
		this.price = price;
	}
	public String getRealPrice() {
		return realPrice;
	}
	public void setRealPrice(String realPrice) {
		this.realPrice = realPrice;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public int getImageId() {
		return imageId;
	}
	public void setImageId(int imageId) {
		this.imageId = imageId;
	}
	
	
}
